<template>
	<div class="user">
		<commonUserinfo :userInfoData="{userItemIndex:itemIndex,userLeftHeight:userLeftHeight,$parent:$parent}">
			<div class="user_main_right f_left text_center">
				<div class="user_right_tip">
					温馨提示：在线报名和继续教育<br>
					报名之前必须先完善个人信息
				</div>
				<div class="user_userInfo complateInfo color666">
					<form ref="completeForm" :model="completeForm">
						<dl>
							<dt class="f_left">真实姓名：</dt>
							<dd class="f_left"><input v-model="completeForm.realName" type="text"></dd>
						</dl>
						<dl>
							<dt class="f_left">身份证号：</dt>
							<dd class="f_left"><input v-model="completeForm.identity" type="text"></dd>
						</dl>
						<dl>
							<dt class="f_left">所在企业：</dt>
							<dd class="f_left"><input v-model="completeForm.workSite" type="text"></dd>
						</dl>

						<a class="modify_sure_btn" @click="completeSave(completeForm)">保存</a>
					</form>
				</div>
			</div>
		</commonUserinfo>
	</div>
</template>

<script>
	import commonUserinfo from '../../../components/cont_education/c_userinfo.vue'
	export default {
		name: "complete_info",
		data: function() {
			return {
				itemIndex: 1,
				userLeftHeight: '',
				completeForm: {
					realName: "",
					identity: "",
					workSite: ""
				}
			}
		},
		mounted: function() {
			/* this.$alert('由于您未进行实名认证或者实名认证信息无效，请重新认证！', '温馨提示', {
				confirmButtonText: '确定'
			}); */
		},
		methods: {
			completeSave: function(completeForm) {
				var that = this;
				if (completeForm.realName.trim() == "") {
					this.$message.error('请输入真实姓名！');
					return;
				}
				if (completeForm.identity.trim() == "") {
					this.$message.error('请输入身份证号！');
					return;
				}
				// if (completeForm.workSite.trim() == "") {
				// 	this.$message.error('请输入所在企业！');
				// 	return;
				// }
				this.common.post(this.api.completeUserInfo, this.completeForm, function(res) {
					that.common.toPage("/cont_education/user/user_info");
				});
			}
		},
		components: {
			commonUserinfo
		}
	}
</script>

<style scoped="scoped">

</style>
